const passwordRegexp = new RegExp(
  '^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.{8,})'
);
export const ruleHelpers = {
  emailRule: (v: string) =>
    /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(v) ||
    'Please enter valid Email',
  required: (v: string) => !!v || 'This Field is required',
  passwordRule: (v: string) =>
    passwordRegexp.test(v) ||
    'Rule: Upper Case, Lower Case, Number, at lease 8 letters',
};
export default { ruleHelpers };
